import javax.xml.soap.Node;
import java.util.HashMap;
import java.util.Map;

class Solution138 {
//    public Node copyRandomList(Node head) {
////          if(head == null )return head ;
////          Map<Node,Node> map = new HashMap<>() ;
////          Node cur = head ;
////          while(cur != null){
////            map.put(cur , new Node(cur.val));
////            cur = cur.next ;
////          }
////          cur = head ;
////          while(cur != null){
////            Node node = map.get(cur) ;
////            if(cur.random != null){
////                node.random = map.get(cur.random) ;
////            }
////            if(cur.next != null){
////                node.next = map.get(cur.next) ;
////            }
////            cur = cur.next ;
////          }
////        return map.get(head);
////    }
}